package org.manage.service;

import org.manage.dto.PageBean;
import org.manage.entity.Department;

import java.util.List;

/**
 * 部门接口
 */
public interface DepartmentService {

    /**
     * 返回所有的部门
     *
     * @return
     */
    List<Department> getAllDepartment();

    /**
     * '
     * 查询当前页的所有部门
     *
     * @param currPage
     * @param pageSize
     * @return
     */
    PageBean<Department> getDepartmentByPage(int currPage, int pageSize);

    /**
     * 保存
     * @param department
     */
    void saveDepartment(Department department);

    /**
     * 根据主键查询部门
     * @param did
     * @return
     */
    Department getDepartmentById(int did);

    /**
     * 更新
     * @param department
     */
    void updateDepartment(Department department);

    /**
     * 根据主键删除
     * @param did
     */
    void deleteDepartment(int did);

}
